package cn.edu.cqut.test0423;

public class Test3 {
	public static void main(String[] args) {
//		String str1  = "hello";
//		str1 = str1+"1";
//		String str2 = new String("hello");
//		String str3 = str1;
//		System.out.println(str1 == str2);//false
//		System.out.println(str1 == str3);//true
//		System.out.println(str2 == str3);//false
//		System.out.println(str1.equals(str3));//true
//		
//		StringBuffer sb = new StringBuffer("hello");
//		sb.append("world");
//		System.out.println(sb.toString());
		
		String fullPath = "F:/src/java/0307/Test1/test.txt";
		System.out.println(fullPath.substring(0, fullPath.lastIndexOf("/")));//路径
		System.out.println(fullPath.substring(fullPath.lastIndexOf("/")+1));//文件名
	}
}
